/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const activityRouter = {
  path: '/activity',
  redirect: '/activity/management',
  component: Layout,
  name: 'Activity',
  meta: {
    title: '活动管理',
    icon: 'el-icon-news'
  },
  children: [
    {
      path: 'publish',
      component: () => import('@/views/activity/publish/index.vue'),
      name: 'Publish',
      meta: { title: '活动发布' }
    },
    {
      path: 'edit',
      component: () => import('@/views/activity/edit/index.vue'),
      name: 'Edit',
      meta: { title: '活动编辑' }
    },
    {
      path: 'management',
      component: () => import('@/views/activity/management/index.vue'),
      name: 'Management',
      meta: { title: '活动管理' }
    },
    {
      // hidden: true,
      path: 'user',
      component: () => import('@/views/activity/user/index.vue'),
      name: 'User',
      meta: { title: '活动记录' }
    },
    {
      // /:id
      // hidden: true,
      path: 'detail',
      component: () => import('@/views/activity/detail/index.vue'),
      name: 'Detail',
      meta: { title: '活动详情' }
    },
    {
      path: 'browse',
      component: () => import('@/views/activity/browse/index.vue'),
      name: 'Browse',
      meta: { title: '活动浏览' }
    },
    {
      path: 'ownRecord',
      component: () => import('@/views/activity/ownRecord/index.vue'),
      name: 'OwnRecord',
      meta: { title: '个人记录' }
    }
  ]
}

export default activityRouter
